package org.aeon.entity;


import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.ToString;

import java.io.Serial;
import java.io.Serializable;
import java.util.Date;

/**
 * 用户
 *
 * @author MissingAeon
 * @email nian0950@qq.com
 * @date 2024-02-24 11:19:05
 */
@Data
@NoArgsConstructor
@ToString(exclude = {"version", "isDel"})
public class User implements Serializable {

	@Serial
	private static final long serialVersionUID = 7436567908873636970L;
	/**
	 * 物理主键
	 */
	private Long id;
	/**
	 * 用户名
	 */
	private String username;
	/**
	 * 密码
	 */
	private String password;
	/**
	 * 昵称
	 */
	private String nickname;
	/**
	 * 电子邮件
	 */
	private String email;
	/**
	 * 创建时间
	 */
	private Date creationTime;
	/**
	 * 最后在线时间
	 */
	private Date finallyOnline;
	/**
	 * 版本
	 */
	private Integer version;
	/**
	 * 逻辑删除（1删除
	 */
	private Integer isDel;

	public User(String username, String password, String nickname, String email) {
		this.username = username;
		this.password = password;
		this.nickname = nickname;
		this.email = email;
	}
}
